#!/usr/bin/env bash
# Usage: script/gem
# Updates the gemspec and builds a new gem in the pkg directory.

mkdir -p pkg
gem build *.gemspec

./script/validate || rm *.gem

echo "*** Packing and moving the octokit gem ***"
if [ -f *.gem ]; then
  mv *.gem pkg
  echo -e '☑ success'
else
  echo -e '☒ failure'
  exit 1
fi

